home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / mg2a_src.zip / SYS / VMS / MGMAILED.COM < prev    next >
Text File  |  1988-08-23  |  843b  |  34 lines

  1. $    Verify = 'F$Verify(0)
  2. $ ! Command procedure to invoke MG from MAIL.  You should
  3. $ ! have the symbol MG globally defined, either as
  4. $ !
  5. $ !    MG :== $dev:[dir]MG
  6. $ !
  7. $ ! Then
  8. $ !    DEFINE MAIL$EDIT dev:[dir]MGMAILEDIT.COM
  9. $ !
  10. $ ! to make MAIL look for this file.
  11. $ !
  12. $ ! or, if using the kept-fork capability,
  13. $ !
  14. $ !    MG :== @dev:[dir]MG.COM
  15. $ !
  16. $ ! Inputs:
  17. $ !
  18. $ !    P1 = Input file name.
  19. $ !    P2 = Output file name.
  20. $ !
  21. $ ! The default directory is the same as the parent process.
  22. $ !
  23. $ ! Copy the input file to the output file, then invoke MG on it.
  24. $ !
  25. $ Set Noon
  26. $ Define/Job MG$AttachTo "''F$Process()'"
  27. $ If P2 .Nes. "" .AND. P1 .Nes. "" Then Copy 'P1' 'P2'
  28. $ Define/User Sys$Input Sys$Command
  29. $ MG 'P2'
  30. $ If F$Trnlnm("MG$AttachTo") .Nes. "" Then - ! MG.COM might have done it already
  31.     Deassign/Job MG$AttachTo
  32. $ If Verify Then -
  33.     Set Verify
  34.